1. Field of the Invention
The present invention generally relates to a one-chip microcomputer system and, more particularly, to a one-chip microcomputer system having a function of substantially correcting the contents of a program written in a mask type read-only memory (mask ROM) incorporated in a one-chip microcomputer used as a controller for controlling an object to be controlled such as a camera.
2. Description of the Related Art
Recent cameras are designed to operate according to a program written in mask type read-only memory (mask ROM) incorporated in a one-chip microcomputer (one-chip CPU). Such a program is created to achieve optimal operations in combinations with various accessaries, which are conceivable at the stage of system design of a camera.
A camera of this type sequentially processes a program from the initial address of the mask ROM upon power-ON reset, and finally stops in a low power consumption mode. In a series of processing operations, the program cannot be stopped at a desired address by an external apparatus, or the state of progress in processing, i.e., the value of a program counter, the value of a random-access memory (RAM), and the like, which are incorporated in the one-chip CPU, cannot be checked by an external apparatus.
In the above-mentioned conventional camera system having the one-chip CPU, the program of the camera system includes programs corresponding to all accessaries available at the time of system design. However, some customers may request to rewrite the program created upon system design of the camera.
The mask ROM comprises a correction area for erroneous operation prevention, and an optional correction area. Upon rewriting of the program, the correction area for erroneous operation prevention may be erroneously deleted.
For this reason, Jpn. Pat. Appln. KOKAI Publication No. 3-186927 discloses a technique associated with program correction of a system comprising a CPU which allows program correction so as to prevent a correction area for erroneous operation prevention from being erroneously deleted.
However, according to the technique of this prior art, although the correction area for erroneous operation prevention can be prevented from being deleted, it is not easy to delete only an optional correction area which is used for changing specifications.
When a countermeasure against a drawback, which is not expected upon system design, is taken in the manufacturing process of a product as a camera system, the specifications of an electric circuit board which mounts a one-chip CPU, and other components are changed accordingly.
In this case, before the versions of components are revised upon the change in specification, a countermeasure is taken using components which are used before the change was made. For this reason, it is difficult to discriminate by visually observing components if a product is a corrected or non-corrected one. Therefore, whether or not a countermeasure must be taken in a production line cannot often be discriminated.
In this case, since program correction itself can be performed by a microcomputer by the technique disclosed in Jpn. Pat. Appln. KOKAI Publication No. 3-186927 above, the above-mentioned countermeasure against the drawback can be taken.
However, a method of distinguishing a corrected microcomputer, which is corrected by the above-mentioned program correction, from a non-corrected one even after the ROM of the microcomputer is corrected is not described. Therefore, a production line or a repair shop is confused by such a microcomputer, and it is difficult for them to discriminate whether or not the product has undergone correction as the countermeasure against the drawback, resulting in difficult management of products.
Furthermore, the recent remarkable technical innovations may realize an accessary having a new function, which was not conceivable upon design of the camera system. Also, after a program of the camera system is created, the program may be required to be partially corrected.
In this case, since the conventional camera system cannot cope with such an accessary having a new function, if a user who possesses the old camera system wants to use the accessary having the new function, he or she must purchase a new camera system. Also, in order to partially correct the program, the entire one-chip microcomputer must be re-designed.
For this reason, for example, U.S. Pat. No. 5,040,016 etc. disclose a camera system which can change a mode or can add a function by inserting a card in a camera main body.
However, in such a camera system, programs corresponding to all cards are prepared in advance, and a program matching with the inserted card can only be selected. For this reason, all modes must be determined upon design of the camera system, and the camera system cannot be checked by a non-programmed function or address after the product is completed.